#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFileDialog>
#include <QStandardPaths>
#include <QMessageBox>
#include <QMimeData>
#include <QFileInfo>
#include <QPalette>
#include <QClipboard>
#include <QDebug>

#include "./process/dealProcess.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    DealProcess *deal_process;

    QFileDialog *file_dialog;

    QMessageBox *message_box;

    QClipboard *clipboard;

    QString command;
    QStringList args;

    QPalette pale;
    QColor color,
           drop_color;

    void configInit();
    void uiInit();
    void connectInit();
    void setBackgroung(QColor color);
    void setUrl(QString url);

protected:
    void dragEnterEvent(QDragEnterEvent *e);
    void dragLeaveEvent(QDragLeaveEvent *e);
    void dropEvent(QDropEvent *e);
};

#endif // MAINWINDOW_H
